package banking;
import banking.*;//调用banking包里的所有函数
public class TestBanking {

	public static void main(String[] args) {
		// TODO 自动生成的方法存根
		Customer customer;//定义一个数据类型为Customer类型的变量customer
	    Account  account;//定义一个数据类型为Account类型的变量account
	    // Create an account that can has a 500.00 balance.
	    System.out.println("Creating the customer Jane Smith.");
	    customer = new Customer("Jane", "Smith");//给customer变量赋值，new一个内存，并向Customer传入参数
	    System.out.println("Creating her account with a 500.00 balance.");
	    customer.setAccount(new Account(500.00));//调用Customer的setAccount方法，并赋值
	    account = customer.getAccount();//给account变量赋值，new一个内存，并向Account传入参数
	    // Perform some account transactions
	    System.out.println("Withdraw 150.00: " + account.withdraw(150.00));//调用Account类中的withdraw方法
	    System.out.println("Deposit 22.50: " + account.deposit(22.50));//调用Account类中的deposit方法
	    System.out.println("Withdraw 47.62: " + account.withdraw(47.62));
	    System.out.println("Withdraw 400.00: " + account.withdraw(400.00));
	    // Print out the final account balance
	    System.out.println("Customer [" + customer.getLastName()
			       + ", " + customer.getFirstName()
			       + "] has a balance of " + account.getBalance());//调用Account类中的getBlance方法,
	    //调用customer的getLastName方法，调用customer的getFirstName方法，
	    

	}

}
